<extend name='Layout/index' />

<block name='breadcrumb'>
	<li>
		<i class="icon-home home-icon"></i>
		<a href="#">首页</a>
	</li>
	<li class="active">积分管理</li>
</block>

<block name='page_header'>
	<h1 style="font-size:14px">
		 积分管理
		<i class="icon-double-angle-right"></i>
		 积分列表
	</h1>
</block>

<block name='main_content'>
<?php $rule=$_SESSION['rule'];$dict=$_SESSION['dict']; ?>
		<div style="height:100px;width:1000px;font-size:14px;margin-top:px;position:absolute;z-index:100;">
		<form style="height:100px;" action="<{:U('yingyong')}>" method="post">
			<div style="margin:10px auto;float:left">会员注册赠送积分：<input style="width:80px;"type='text' name="rule" value="<?php echo $rule; ?>"></div>
			<div style="margin:10px 100px;float:left;">现金积分兑换规则：1元 = <input  style="width:80px;"type="text" name="dict" value="<?php echo $dict; ?>"></div>
			<button style="margin:10px; float:right;margin-right:30px;">应 用</button>
			
			
			
			<div style="clear:both;"></div>
		</form>

		</div>
		<div class="row" style="margin-top:80px;">
		<div class="col-md-12">
			<table class='table' style="font-size:14px;">
			<thead>
				<tr>
					<th>会员id</th>
					<th>会员名称</th>
					<th>积分数量</th>
					<th>积分增减操作</th>
					<th>积分操作详情</th>
				<!-- 	<th>操作</th> -->
				</tr>
			</thead>
			<tbody>
				<volist name='list' id='vo'>

		
				<tr>
					<td class="id"><{$vo.uid}></td>
					<td class="name">&nbsp<{$vo.name}></td>
					<td class="integral">&nbsp<{$vo.integral}></td>
					<td><a onclick="jia(this,1)" href="javascript:showBg();" class="btn btn-danger">+</a>
						<a onclick="jia(this,0)" href="javascript:showBg();" class="btn btn-info"> - </a></td>
					<td><a href="<{:U('details', array('uid'=>$vo['uid']))}>" class="btn btn-danger">查看详情</a></td>
					
				</tr>  

				

				





				</volist>
				
				<div id="main"> <!-- <a >点击这里查看效果</a> --> 
		        <div id="fullbg"></div> 
		        <!-- 外层大框 -->
		        <div id="dialog" style="height:400px;"> 
		        <p class="close"><a href="#" onclick="closeBg();">关闭</a></p> 
		         <div>
		         	<div style="font-size:16px;margin-top:20px;">添加会员积分</div>
		         	<div style="font-size:16px;">
		         		<form action="<{:U('update')}>" method="post">
		         			<div style="float:left;margin-right:20px;width:80px;">会员ID:</div><div id="id" style="float:left;margin-right:50px;width:100px;"></div>
		         			<input type="hidden" name="uid">
		         			<div style="float:left;margin-right:20px;width:80px;">会员名称:</div><div id = "name" style="float:left;width:100px;"></div>
		         			<div style="clear:both;"></div>
		         			<div style="float:left;margin-right:20px;width:80px;margin-top:5px;">剩余积分:</div><div  id="integral" style="float:left;margin-right:50px;width:100px;margin-top:5px;"></div>
		         			<div style="float:left;margin-right:20px;width:80px;margin-top:5px;">积分操作:</div><div id ="deal" style="float:left;width:100px;margin-top:5px;"></div>
		         			<input type="hidden" name="deal">
		         			<div style="clear:both;"></div>
		         			<div style="float:left;margin-right:20px;width:80px;margin-top:5px;">操作积分:</div>
		         			<input style="width:60px;margin-top:5px;" type="text" name="value">
		         			<div style="clear:both;"></div>
		         			<div style="float:left;margin-right:20px;width:80px;margin-top:5px;">操作积分:</div>
		         			<textarea style="margin-top:5px;" name="reason" cols="60" rows="8">
		         			</textarea>
		         			<div style="clear:both;"></div>
		         			<button style="margin-left:30px;">修改</button>
		         		</form>
		         	</div>
		         	
		         		
		         	
		         </div>
		        </div> 
		        </div> 
			</tbody>
		</table>
		</div>
	</div>
 <script type="text/javascript"> 
 function jia(ss,j){
					var id = $(ss).parent().prev().prev().prev().html();
					var name = $(ss).parent().prev().prev().html();
					var integral = $(ss).parent().prev().html();
					$("#id").html(id);
					$("#id").next('input').val(id);
					$("#name").html(name);
					$("#integral").html(integral);
					if(j==1){
						$("#deal").html('增加');
						$("#deal").next('input').val('增加');
					}else{
						$("#deal").html('减少');
						$("#deal").next('input').val('减少');
					}
					

	
						}


//显示灰色 jQuery 遮罩层 
function showBg() { 
var bh = $("body").height(); 
var bw = $("body").width(); 
$("#fullbg").css({ 
height:bh, 
width:bw, 
display:"block" 
}); 
$("#dialog").show(); 
} 
//关闭灰色 jQuery 遮罩 
function closeBg() { 
$("#fullbg,#dialog").hide(); 
} 
</script>
</block>